package com.acane.instagram.service.impl;

import com.acane.instagram.mapper.TagMapper;
import com.acane.instagram.pojo.Tag;
import com.acane.instagram.service.TagService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TagServiceImpl extends ServiceImpl<TagMapper, Tag> implements TagService {
    @Autowired
    private TagMapper tagMapper;
    @Override
    public void saveTags(String postId, String tagId) {
        tagMapper.saveTags(postId, tagId);
    }

    @Override
    public List<Tag> getTagsByPostId(String postId) {
        return tagMapper.getTagsByPostId(postId);
    }
}
